Skip to content

test: exercise every Cloud read command against a live stack - #60

Open
JacobPEvans-personal wants to merge 1 commit into
build/stdlib-venvfrom
test/cloud-read-catalog
Open

test: exercise every Cloud read command against a live stack#60
JacobPEvans-personal wants to merge 1 commit into
build/stdlib-venvfrom
test/cloud-read-catalog

Conversation

@JacobPEvans-personal

Copy link
Copy Markdown
Contributor

Stacked on #59.

What

  • Add tests/integration/cloud/, mirroring tests/integration/enterprise/:
    • conftest.py — one credential gate for the whole Cloud tree.
    • read/test_catalog.py — every catalogued read, run against a live stack.
    • read/test_acs_operations.py — the previous test_acs_live.py, moved.
  • Update the Cloud canary workflow to run named phases like the Enterprise job, and publish a summary for both.

Why

Enterprise had catalog-driven coverage of all 61 reads. Cloud had three hand-written ACS checks. The gap mattered most where Cloud is weakest: coverage is read-only and partial, so the guarantee worth proving is that an unsupported command fails cleanly rather than guessing at an endpoint the stack does not serve.

The contract it asserts

Read Required behavior
Served by Cloud (index list, role list, hec-token list) and offline inspect exit 0 and a typed {data, meta} envelope
Every other read leaf a documented exit code and a typed {error} envelope — never a traceback, never a silent fallthrough

The must-succeed set is derived from the real dispatch table (has_cloud_list), not hardcoded, so adding a Cloud route extends this suite automatically instead of letting the test drift from the code.

Proof

  • Lane collects 68 Cloud tests: 65 in the catalog (61 read leaves + 4 must-succeed) and 3 ACS operations.
  • Full local gate: ruff, ruff-format, pyright, 897 passed.
  • The credential gate was verified to fail, not skip: pointed at a non-Cloud URL with the opt-in set, it produced hard errors for every test rather than passing silently.

Note

pyproject.toml switches to --import-mode=importlib with pythonpath = ["tests"] so the Enterprise and Cloud suites can share the test_catalog.py filename. Without it pytest cannot distinguish two same-named test modules.

Cloud had three hand-written ACS checks while Enterprise had a catalog-driven
suite covering every read leaf. The gap mattered most where Cloud is weakest:
coverage is read-only and partial, so the behavior worth proving is that an
unsupported command fails cleanly instead of falling through to an endpoint the
stack does not serve.

The new suite runs the same catalog the Enterprise suite uses. Reads that Cloud
serves must return a typed data envelope; every other read must return a typed
error envelope and a documented exit code. The must-succeed set is derived from
the real dispatch table, so adding a Cloud route extends the suite instead of
letting it drift.

The credential gate fails loudly on a missing token or a non-Cloud URL, so a
misconfigured canary cannot pass by skipping every test.

Assisted-by: Claude:claude-fable-5
Claude-Session: https://claude.ai/code/session_0117oTjSHHjg1nh28LGRZ7My
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant